<!DOCTYPE html>
<html lang="en">


<head th:replace="~{/admin/_fragments:: head(~{::title})}">

<!--<head>-->
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录管理</title>
    <link rel="stylesheet" href="../../static/semantics-dist/semantic.min.css" th:href="@{/semantics-dist/semantic.min.css}">
    <link rel="stylesheet" href="../../static/css/me.css" th:href="@{/css/me.css}">

    <script src="../../static/js/jquery-3.7.1.min.js" th:src="@{/js/jquery-3.7.1.min.js}" ></script>
    <script src="../../static/semantics-dist/semantic.min.js" th:src="@{/semantics-dist/semantic.min.js}" ></script>>
 </head>
<body>
<br>
<br><br>
<br><br>
<br>

<div class="m-container-small m-padded-lr-massive" style=" max-width: 45em !important;">

    <div class="ui container">
        <div class="ui middle aligned center aligned grid">
            <div class="column">
                <h2 class="ui teal image header">
                    <img src="../../static/images/mio3.jpg" class="circular rounded  image"  th:src="@{/images/icon1logo32.ico}" style="width:32px" >

                    <div class="content">
                        账号登录
                    </div>
                </h2>

                <form class="ui large form" method="post" action = "#" th:action = "@{/admin/login}">
                    <div class="ui stacked segment">
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="user icon"></i>
                                <input type="text" name="username" placeholder="用户名">
                            </div>
                        </div>
                        <div class="field">
                            <div class="ui left icon input">
                                <i class="lock icon"></i>
                                <input type="password" name="password" placeholder="密码">
                            </div>
                        </div>

                        <button class="ui fluid large teal submit button">登录</button>
                        <div></div>

                    </div>
                    <div class="ui grid">
                        <div class="ui twelve wide column"></div>
                        <div class="ui four wide column">
                            <a class="ui fluid   right aligned small button" th:href="@{/admin/register}">注册</a>
                        </div>
                    </div>
                    <div class="ui error mini message"></div>
                    <div class="ui mini negative message" th:unless="${#strings.isEmpty(message)}" th:text="${message}">用户名和密码错误</div>

                </form>


            </div>
        </div>
    </div>
</div>

</body>
</html>
<script>
    $('.ui.form').form({
        fields : {
            username : {
                identifier: 'username',
                rules: [{
                    type : 'empty',
                    prompt: '请输入用户名'
                }]
            },
            password : {
                identifier: 'password',
                rules: [{
                    type : 'empty',
                    prompt: '请输入密码'
                }]
            }
        }
    });
</script>






